package com.taojiazheng.common;

import java.util.*;

/**
 * @author 赵成林
 * @date 2017/11/30 12:15
 */
class MyThead implements Runnable
{
    public void run()
    {
        System.out.println("我休息了！");
        try
        {
            Thread.sleep(5000);
        }
        catch (InterruptedException e)
        {
        }
        System.out.println("一秒后在叫我吧！");
    }
}

public class ThreadMain
{
    public static void main(String[] args)
    {
        MyThead myThead = new MyThead();
        Thread thread = new Thread(myThead);
        thread.start();
    }
}
class test{
    public static void mian(String [] args){
        int i,j,x;
        Scanner scanner = new Scanner(System.in);
        int k = scanner.nextInt();
        int n = scanner.nextInt();
        List<List<Integer>> list = new ArrayList();
        for(i = 0;i < k;i ++){
            List<Integer> newList = new ArrayList();
            for(j = 0;j < n;j ++){
                x=scanner.nextInt();
                newList.add(x);
            }
            list.add(newList);
        }
        int [] index = new int[9999];
        for(i = 0;i <k;i ++)
            index[i] = 0;
        boolean b = true;
        int min=0,max=0,mint,maxt,p,minI = 99999;
        while(b){
            mint =  list.get(0).get(index[0]);
            maxt = list.get(0).get(index[0]);
            p = 0;
            for(i = 1;i < k;i ++){
                if(list.get(i).get(index[i]) < mint){
                    mint = list.get(i).get(index[i]);
                    p = i;
                }
                if(list.get(i).get(index[i]) > maxt){
                    maxt = list.get(i).get(index[i]);
                }
            }
            if(maxt - mint < minI){
                max = maxt;
                min = mint;
                minI = maxt - mint;
            }
            index[p] ++;
            if(index[p] >= n)
                b = false;
        }
        System.out.println("["+ min+"]"+max);
    }


}
